﻿/*
 * Copyright 2010 Pieter De Rycke
 *
 * This file is part of Frozen Bubble XNA.
 *
 * Frozen Bubble XNA is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2, as published by the Free Software Foundation.
 *
 * Frozen Bubble XNA is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with Frozen Bubble XNA. If not, see 
 * <http://www.gnu.org/licenses/>.
 *
 * Artwork:
 *    Alexis Younes <73lab at free.fr>
 *      (everything but the bubbles)
 *    Amaury Amblard-Ladurantie <amaury at linuxfr.org>
 *      (the bubbles)
 *
 * Soundtrack:
 *    Matthias Le Bidan <matthias.le_bidan at caramail.com>
 *      (the three musics and all the sound effects)
 *
 * Design & Programming:
 *    Guillaume Cottenceau <guillaume.cottenceau at free.fr>
 *      (design and manage the project, whole Perl sourcecode)
 *
 * XNA and Windows Phone 7 port:
 *    Pieter De Rycke
 *
 * Websites:
 *    http://www.frozen-bubble.org/
 *    http://pieterderycke.wordpress.com/
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace FrozenBubble
{
    public interface IPlayerDimensions
    {
        int LeftLimit { get; }
        int RightLimit { get; }
        int BottomLimit { get; }
        int InitialTopLimit { get; }
        int InitialBubbleY { get; }
        int CompressorPositionX { get; }
        Vector2 MallusPosition { get; }
        Vector2 ScoresPosition { get; }
        Vector2 CenterPanelPosition { get; }
        Vector2 PinguinPosition { get; }
        Vector2 PauseClipPosition { get; }
        Vector2 HurryPosition { get; }
        Vector2 NextBubblePosition { get; }
        Vector2 LogoPosition { get; }
        int TimeHurryWarn { get;  }
        int TimeHurryMax { get; }
    }

    public class WindowsSinglePlayerDimensions : IPlayerDimensions
    {
        public int LeftLimit { get; private set; }
        public int RightLimit { get; private set; }
        public int BottomLimit { get; private set; }
        public int InitialTopLimit { get; private set; }
        public int InitialBubbleY { get; private set; }
        public int CompressorPositionX { get; private set; }
        public Vector2 MallusPosition { get; private set; }
        public Vector2 ScoresPosition { get; private set; }
        public Vector2 CenterPanelPosition { get; private set; }
        public Vector2 PinguinPosition { get; private set; }
        public Vector2 PauseClipPosition { get; private set; }
        public Vector2 HurryPosition { get; private set; }
        public Vector2 NextBubblePosition { get; private set; }
        public Vector2 LogoPosition { get; private set; }
        public int TimeHurryWarn { get; private set; }
        public int TimeHurryMax { get; private set; }

        public WindowsSinglePlayerDimensions()
        {
            LeftLimit = 190;
            RightLimit = 446;
            BottomLimit = 470;
            InitialTopLimit = 44;
            InitialBubbleY = 390;
            CompressorPositionX = 321;
            MallusPosition = new Vector2(-1, 408);
            ScoresPosition = new Vector2(180, 432);
            CenterPanelPosition = new Vector2(149, 190);
            PinguinPosition = new Vector2(358, 437); //168 + LeftLimit
            PauseClipPosition = new Vector2(263, 212);
            HurryPosition = new Vector2(200, 265); // x = 10 + 190
            NextBubblePosition = new Vector2(112, 440);
            LogoPosition = new Vector2(-1, -1);

            TimeHurryWarn = 400;
            TimeHurryMax = 525;
        }
    }

    public class WindowsPhonePlayerDimensions : IPlayerDimensions
    {
        public int LeftLimit { get; private set; }
        public int RightLimit { get; private set; }
        public int BottomLimit { get; private set; }
        public int InitialTopLimit { get; private set; }
        public int InitialBubbleY { get; private set; }
        public int CompressorPositionX { get; private set; }
        public Vector2 MallusPosition { get; private set; }
        public Vector2 ScoresPosition { get; private set; }
        public Vector2 CenterPanelPosition { get; private set; }
        public Vector2 PinguinPosition { get; private set; }
        public Vector2 PauseClipPosition { get; private set; }
        public Vector2 HurryPosition { get; private set; }
        public Vector2 NextBubblePosition { get; private set; }
        public Vector2 LogoPosition { get; private set; }
        public int TimeHurryWarn { get; private set; }
        public int TimeHurryMax { get; private set; }

        public WindowsPhonePlayerDimensions()
        {
            LeftLimit = 66;
            RightLimit = 407;
            BottomLimit = 780;
            InitialTopLimit = 219;
            InitialBubbleY = 695;
            CompressorPositionX = 240;
            MallusPosition = new Vector2(-1, 408);
            ScoresPosition = new Vector2(55, 735);
            CenterPanelPosition = new Vector2(75, 320);
            PinguinPosition = new Vector2(290, 740);
            PauseClipPosition = new Vector2(263, 212);
            HurryPosition = new Vector2(118, 300); // x = 10 + 190
            NextBubblePosition = new Vector2(150, 745);
            LogoPosition = new Vector2(0, 20);
            TimeHurryWarn = 400;
            TimeHurryMax = 525;
        }
    }
}
